﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace StackExchangeRedis
{
    class Program
    {
        static async Task Main(string[] args)
        {
         

            var list = new List<stuinfo>();
            list.Add(new stuinfo(){ id=1, name="1222"});
            list.Add(new stuinfo() { id =2, name = "22222" });
            var value=    await   RedisHelper.ListRightPushAsync("test2", list);
      
            var result=   await RedisHelper.ListRightPopAsync<List<stuinfo>>("test2");
            var list1 = new List<stuinfo>();
            list1.Add(new stuinfo() { id = 3, name = "5555" });
            list1.Add(new stuinfo() { id = 4, name = "6666" });
            var value2 = await RedisHelper.ListRightPushAsync("test2", list1);
            var resul2t = await RedisHelper.ListRightPopAsync<List<stuinfo>>("test2");
        }
    }

    public class stuinfo
    {
        public int id { get; set; }

        public string name { get; set; }
    }
}
